﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hyt.Core.Security;
using System.ComponentModel;
using Hyt.Core.Data;

namespace Hyt.Passport.Models
{
    [DefaultOrderby("Code")]
    public class Department : Principal
    {
        /// <summary>
        /// 每一级Code长度
        /// </summary>
        public static int OnGradeCodeLength = 2;

        public Department()
        {
            Administrators = new HashSet<Administrator>();
            Positions = new HashSet<Position>();
        }

        [Description("部门名称")]
        public  string Name { get; set; }

        [Description("部门编码")]
        public  string Code { get; set; }
        public ICollection<Administrator> Administrators { get; set; }
        public ICollection<Position> Positions { get; set; } 
    }
}
